asp中为什么<script></script>之间的代码执行不了?

来源:百度知道 编辑:UC知道 时间:2024/04/30 09:03:12
<!--#Include file="opendb.asp"-->
<%
unitname=request.Form("unitname")
unitorder=request.Form("unitorder")
if unitname="" or unitorder="" then
response.Redirect("danweitj.asp")
end if
%>
<%
strSql="select * from unit where unitname="&"'"&unitname&"'"
rst.cursortype=3
rst.open strSql
if rst.recordcount>0 then
%>
<script language="vbscript">
msgbox"单位名称已被使用!",48,"添加失败"
window.history.go(-1)
</script>
<%else%>
<%
rst.close
dim strSq
strSq="select * from unit where unitorder="&unitorder
rst.cursortype=3
rst.open strSq
if rst.recordcount>0 then
%>
<script language="vbscript">
msgbox"

<script language="vbscript">
msgbox"单位名称已被使用!",48,"添加失败"
window.history.go(-1)
</script>
这么写是错误滴,VB脚本里没有msgbox这种东西.

<script language="javascript">
window.alert("单位名称已被使用!");
window.history.go(-1)
</script>
下面的同理
----------------------------------------------------------
可否把你修改后的代码再帖一遍呢?

VBSCRIPT里有 MSGBOX
但你好像用错了
MSGBOX("要输出的内容")